package www.kingee.socket;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.net.Socket;

public class MyClient
{
  public static void main(String[] args)
    throws IOException, InterruptedException
  {
    Socket socket = new Socket("192.168.0.37", 30000);
    new Thread(new ClientThread(socket)).start();

    PrintStream ps = new PrintStream(socket.getOutputStream());
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    while (true)
      ps.println(socket.getLocalPort() + ":" + br.readLine());
  }
}

